package Demo1;

import Demo1.MyArrayList;

public class Test {


    public static void main(String[] args) {
        MyArrayList myArrayList = new MyArrayList();
        myArrayList.display();
        myArrayList.add(1);
        myArrayList.add(2);
        myArrayList.add(3);
        myArrayList.display();

        myArrayList.add(3,4);
        myArrayList.add(4,5);
        myArrayList.add(5,6);
        myArrayList.display();

        //myArrayList.add(7,7);

        System.out.println(myArrayList.contains(3));

        System.out.println(myArrayList.indexOf(3));

        System.out.println(myArrayList.get(4));

        myArrayList.remove(2);
        myArrayList.display();

        myArrayList.clear();
        myArrayList.display();
    }
}
